package com.atguigu.spzx.model.entity.product;

import com.atguigu.spzx.model.entity.base.BaseEntity;
import lombok.Data;

import java.util.List;

/**
 * @author syh
 * @create 2023-08-21 12:54
 */
@Data
public class Category extends BaseEntity {

    private String name;
    private String imageUrl;
    private Long parentId;
    private Integer status;
    private Integer orderNum;
    private Boolean hasChildren;
//    private List<Category> children;直接查询分类时展示所有的父子数据，声明集合类型的属性接收子数据
    //页面中懒加载无需封装子集合
    private List<Category> children;

}
